﻿using Shop.RemoteModel;
using Shop.RemoteModel.PageModuleList.Model;
using Shop.StoreGatewayModular.Interface;
using WeDonekRpc.ApiGateway.Attr;
using WeDonekRpc.Helper.Validate;
using WeDonekRpc.HttpApiGateway;
namespace Shop.StoreGatewayModular.Api
{
    [ApiRouteName("/shop/page/module/{name}")]
    public class ModuleListApi : ApiController
    {
        private readonly IModuleListService _Service;

        public ModuleListApi ( IModuleListService service )
        {
            this._Service = service;
        }

        public PageModuleDto[] Gets ( [EnumValidate("shop.page.use.range.error", typeof(PageUseRange))] PageUseRange range )
        {
            return this._Service.Gets(range);
        }
    }
}
